package com.yan.springcloud.mapper;

import com.yan.springcloud.pojo.Dept;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface DeptMapper {

    @Insert("insert into deptno(dname) values(#{dname})")
    public boolean addDept(Dept dept);

    @Select("select * from dept where deptno=#{deptno}")
    public Dept queryById(Long deptno);

    @Select("select * from dept")
    public List<Dept> queryAll();
}
